import path from "path";
import fs from 'fs';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const file = fs.readFileSync(path.join(__dirname, './dist/AppManifest.json'))
const config = JSON.parse(file.toString())
config.versionCode += 1
const str = JSON.stringify(config)
fs.writeFileSync(path.join(__dirname, './public/AppManifest.json'), str)
fs.writeFileSync(path.join(__dirname, './dist/AppManifest.json'), str)
//提示信息
console.log('打包完毕=====>' + ' applicationId:' + config.applicationId + ' versionCode:' + config.versionCode);